<?php
include "../config/koneksi.php";

if(isset($_POST['submit']))
{
    $nama_tamu = $_POST['nama_tamu'];
    $email_tamu = $_POST['email_tamu'];
    $judul = $_POST['judul'];
    $pesan_tamu = $_POST['pesan_tamu'];
    //echo "<b> $nama_tamu </b><br>";    
    //echo "<b> $email_tamu </b><br>";    
    //echo "<b> $judul </b><br>";    
    //echo "<b> $pesan_tamu </b><br>";    
	
	$query = mysql_query("insert into buku_tamu(nama_tamu, email_tamu, judul, pesan_tamu) values ('$nama_tamu', '$email_tamu','$judul','$pesan_tamu') ");
}
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SMK Pasundan Rancaekek</title>

<link href="../css/templatemo_style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="../css/ddsmoothmenu.css" />
<script type="text/javascript" src="../scripts/jquery.min.js"></script>
<script type="text/javascript" src="../scripts/ddsmoothmenu.js">

</script>

<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "templatemo_menu", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

</script>
</head>

<body id="subpage">

<div id="templatemo_outer_sub_wrapper">
	<div id="templatemo_sub_wrapper">
    
    	<div id="templatemo_header_admin">		
            <?php
			include "menu_admin.php";
			?>
            <div class="cleaner"></div>

        </div> <!-- end of templatemo header -->
        
        <div id="templatemo_main">
        
          	<div class="col_w960 col_w960_last">
				<div class="col_w300 float_r">
                
                    <h3>Tentang Sekolah</h3>
                    <?php 
					include "menu_kiri.php";
					?>
                
                </div>  
                <div class="col_w600 float_l">
                    
                    <h2>Pendaftaran Siswa Baru</h2>
        		
        		<div id="contact_form">
				<form method="post" name="contact" action="<?php echo $_SERVER['PHP_SELF']; ?>">
                        
						
						<table border="0" width="650">
						<tr>
						<td colspan="4">
						<ul class="templatemo_list">
						<li><strong>DATA DIRI</strong></li>
						</ul>
						</td>
						</tr>
						<tr>
						<td>Nama Lengkap </td> <td colspan="3"> <input type="text" name="nama_lengkap" size="30" /> </td>                        
						</tr>
						
						<tr>
						<td>Jenis Kelamin </td> <td colspan="3">
						<input type=radio name='jenis_kelamin' value='L' checked>Laki-Laki 
                        <input type=radio name='jenis_kelamin' value='P'> Perempuan
						</td>                        
						</tr>
						
						<tr>
						<td>Agama </td> <td colspan="3">
						<select name='agama'>								
							<?php
							$tampil=mysql_query("SELECT * FROM agama");
							while($r=mysql_fetch_array($tampil)){
								echo "<option value=$r[id_agama]>$r[nama_agama]</option>";
							}
							?>
						</select>
						</td>                        
						</tr>
						
						<tr>
						<td>Tempat Lahir </td> <td colspan="3"> <input type="text" name="tempat_lahir" size="20" /> </td>                        
						</tr>
						
						<tr>
						<td>Tgl Lahir </td> <td colspan="3"> <input type="text" name="tgl_lahir" size="20" /> </td>                        
						</tr>
                        
						<tr>
						<td valign="top">Data Fisik</td> <td colspan="3" width="700">
						Berat Badan <input type="text" name="berat_badan" size="2" /> Kg
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						Tinggi Badan <input type="text" name="tinggi_badan" size="2" /> Cm <br>
						Ukuran Sepatu <input type="text" name="ukuran_sepatu" size="2" /> 
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						Ukuran Celana <input type="text" name="ukuran_celana" size="2" /> 
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						Ukuran Baju 
						<select name='ukuran_baju'>								
							<option value='S']>S</option>
							<option value='M']>M</option>
							<option value='L']>L</option>
						</select>
						</td>                        
						</tr>
                        
						<tr>
						<td>Alamat </td> <td colspan="3"><input type="text" name="alamat" size="40" /> </td>                        
						</tr>
						<tr>
						<td> </td> <td colspan="3">
						RT <input type="text" name="rt" size="1" /> 
						RW <input type="text" name="rw" size="1" /> <br/>
						Desa <input type="text" name="desa" size="40" /> <br/>
						Kecamatan <input type="text" name="kecamatan" size="40" /> <br/>
						Kota/Kabupaten <input type="text" name="kota" size="40" /> <br/>
						Kodepos <input type="text" name="kodepos" size="5" /> 
						Telp <input type="text" name="telp" size="15" /> <br/>
						Provinsi <input type="text" name="provinsi" size="20" /> <br/>
						Email <input type="text" name="email" size="30" /> <br/>
						
						</td>                        
						</tr>
						<tr>
						<td colspan="4">
						<ul class="templatemo_list">
						<li><strong>PENDIDIKAN</strong></li>
						</ul>
						</td>
						<tr> <td>Sekolah Asal </td> <td colspan="3"><input type="text" name="sekolah_asal" size="50" /> </td> </tr>
						<tr> <td>
						Tahun Masuk </td> <td colspan="3"><input type="text" name="tahun_masuk" size="5" /> 
						&nbsp;&nbsp;&nbsp;&nbsp;
						c. No. SKHUN <input type="text" name="no_skhun" size="20" /> 
						
						</td> </tr>
						</tr>
						
						
						<tr>
						<td colspan="4">
						<ul class="templatemo_list">
						<li><strong>DATA ORANG TUA</strong></li>
						</ul>
						</td>
						</tr>
						<tr> <td>Nama Ayah </td> <td colspan="3"><input type="text" name="nama_ayah" size="40" /> </td> </tr>
						<tr> <td>Usia</td> <td colspan="3"><input type="text" name="usia_ayah" size="5" /> tahun</td> </tr>
						<tr> <td>Pekerjaan</td> <td colspan="3"><input type="text" name="pekerjaan_ayah" size="30" /></td> </tr>
						<tr> <td>Nama Ibu </td> <td colspan="3"><input type="text" name="nama_ibu" size="40" /> </td> </tr>
						<tr> <td>Usia</td> <td colspan="3"><input type="text" name="usia_ibu" size="5" /> tahun</td> </tr>
						<tr> <td>Pekerjaan</td> <td colspan="3"><input type="text" name="pekerjaan_ibu" size="30" /></td> </tr>
						<tr> <td>Jumlah Anak</td> <td><input type="text" name="jumlah_anak" size="5" /> orang </td> 
						<td colspan="3"> anak ke <input type="text" name="anak_ke" size="5" /></td> 
						</tr>
						<tr>
						
						</tr>
						<td colspan="4">
						Rata-rata penghasilan pendapatan /bulan (ayah dan ibu)
						<select name='penghasilan'>								
							<option value='1']>&ge; Rp 2 juta/bulan</option>
							<option value='2']>Rp 1 juta s/d 2 juta/bulan</option>
							<option value='3']>&le; Rp 1 juta/bulan</option>
						</select>
						</td>
						<tr>
						<td colspan="4">
						<ul class="templatemo_list">
						<li><strong>KELENGKAPAN</strong></li>
						</ul>
						</td>
						</tr>
						<tr>
						<td width="200"> a. Photo copy ijazah (dilegalisir) </td> <td><input type="text" name="ijazah" size="5" /> </td>
						<td> d. Surat kelakuan baik dari Sekolah </td> <td><input type="text" name="kelakuan_baik" size="5" /> </td>
						</tr>
						
						<tr>
						<td width="200"> b. Photo copy SKHUN (dilegalisir) </td> <td><input type="text" name="skhun" size="5" /> </td>
						<td> e. Surat keterangan sehat </td> <td><input type="text" name="keterangan_sehat" size="5" /> </td>
						</tr>
						
						<tr>
						<td width="200"> c. Pas Photo 2x3, 3x4, 4x6 2 lmbr </td> <td><input type="text" name="pasphoto" size="5" /> </td>
						<td> f. Surat keterangan tidak buta warna </td> <td><input type="text" name="tidak_buta_warna" size="5" /> </td>
						</tr>
						
						<tr>
						<td>						
						</td>
						<td colspan="3">				
                        <input type="submit" value="Send" id="submit" name="submit" class="submit_btn float_l" />
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <input type="reset" value="Reset" id="reset" name="reset" class="submit_btn float_l" />
						</td>						
						</tr>
						</table>						
                    </form>
        		</div>
                </div>
                
            	<div class="cleaner"></div>   
            </div>        
        </div>
    
    </div> <!-- end of templatemo_wrapper -->
</div> <!-- end of templatemo_outer_wrapper -->

<?php
	include "../footer.php";
?>

</body>
</html>